<?xml version="1.0" encoding="UTF-8"?>

<!--
    Document   : tinNew_ChoThue.xsl
    Created on : March 5, 2012, 1:03 AM
    Author     : huanht
    Description:
        Purpose of transformation follows.
-->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="html"/>

    <!-- TODO customize transformation rules 
         syntax recommendation http://www.w3.org/TR/xslt 
    -->
    <xsl:template match="/">

        <xsl:for-each select="//tindang[tenloaitin='Cho Thuê'  and @status!='delete']">

            <xsl:sort select="lancuoicapnhat" order="descending"/>
            <xsl:if test="not (position()>5)">
                <html>
                        <head>
                            <title></title>
                        </head>
                        <body>
                            <table width="500px">
                                <xsl:attribute name="id">chothue_table<xsl:number value="position()" format="1"/>
                                </xsl:attribute>
                                <tr>
                                    <td rowspan="5" width="100px">
                                        <img src="{hinhanh}" border="1" width="100px">
                                            <xsl:attribute name="id">chothue_imagetin<xsl:number value="position()" format="1"/>
                                            </xsl:attribute>
                                        </img>
                                    </td>

                                    <td>
                                        <span>
                                            <xsl:attribute name="id">chothue_tieudetin<xsl:number value="position()" format="1"/>
                                            </xsl:attribute>
                                            <b><xsl:value-of select="tieudetin"/></b>
                                        </span>
                                    </td>
                                    <td></td>

                                </tr>

                                <tr>
                                    <td>
                                        <div style="font-size: 10px; font-style: italic;">Lần cuối cập nhật:
                                            <span>
                                                <xsl:attribute name="id">chothue_lancuoicapnhat<xsl:number value="position()" format="1"/>
                                                </xsl:attribute>
                                                <xsl:value-of select="lancuoicapnhat"/>
                                            </span>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td><b>Vị trí:</b>
                                        <span>
                                            <xsl:attribute name="id">chothue_quanhuyen<xsl:number value="position()" format="1"/>
                                            </xsl:attribute>
                                            <xsl:value-of select="khuvuc/quanhuyen"/>
                                        </span>-
                                        <span>
                                            <xsl:attribute name="id">chothue_tinhthanh<xsl:number value="position()" format="1"/>
                                            </xsl:attribute>
                                            <xsl:value-of select="khuvuc/tinhthanh"/>
                                        </span>
                                    </td>
                                </tr>
                                <tr>
                                    <td><b>DTKV: </b>
                                        <span>
                                            <xsl:attribute name="id">chothue_dtkv<xsl:number value="position()" format="1"/>
                                            </xsl:attribute>
                                            <xsl:value-of select="dientichkhuonvien/solieu"/>
                                        </span>
                                        <span style="padding-left: 6px;">
                                            <xsl:attribute name="id">chothue_dvddtkv<xsl:number value="position()" format="1"/>
                                            </xsl:attribute>
                                            <xsl:value-of select="dientichkhuonvien/dvddientichkhuonvien"/>
                                        </span>
                                        <span style="padding-left: 15px;"/>
                                        <b>DTXD: </b>
                                        <span>
                                            <xsl:attribute name="id">chothue_dtxd<xsl:number value="position()" format="1"/>
                                            </xsl:attribute>
                                            <xsl:value-of select="dientichxaydung/solieu"/>
                                        </span>
                                        <span style="padding-left: 6px;">
                                            <xsl:attribute name="id">chothue_dvddtxd<xsl:number value="position()" format="1"/>
                                            </xsl:attribute>
                                            <xsl:value-of select="dientichxaydung/dvddientichxaydung"/>
                                        </span>
                                    </td>
                                </tr>
                                <tr>
                                    <td><b>Giá: </b>
                                        <span>
                                            <xsl:attribute name="id">chothue_giatien<xsl:number value="position()" format="1"/>
                                            </xsl:attribute>
                                            <xsl:value-of select="giatien/solieu"/>
                                        </span>
                                        <xsl:text>  </xsl:text>
                                        <span style="padding-left: 6px;">
                                            <xsl:attribute name="id">chothue_dvdgiatien<xsl:number value="position()" format="1"/>
                                            </xsl:attribute>
                                            <xsl:value-of select="giatien/dvdgiatien"/>
                                        </span>
                                    </td>
                                </tr>
                                <tr>
                                    <form action="chitietnhadat.do" method="post">
                                        <td></td>
                                        <td>
                                            <input type="hidden" name="msts" value="{matindang}">
                                                <xsl:attribute name="id">chothue_msts<xsl:number value="position()" format="1"/>
                                                </xsl:attribute>
                                            </input>
                                        </td>
                                        <td>
<!--                                            <input type="submit" name="" value="Xem Thêm"/>-->
                                            <input type="image" src="images/Button.jpg" alt="Submit button"/>
                                        </td>
                                    </form>
                                </tr>
                            </table>
                        <hr/>
                        </body>
                    </html>
            </xsl:if>



        </xsl:for-each>

    </xsl:template>

</xsl:stylesheet>
